package com.jet.office.inner;

import com.jet.core.result.ResultJson;
import com.jet.office.domain.entity.IndustryAttrEntity;
import com.jet.office.domain.vo.MerchantIndustryInfoVo;
import com.jet.office.service.IMerchantIndustryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author dcl
 * @since 2025/2/21 17:33
 */
@RestController
@RequestMapping("/inner/office-edition/industry")
public class InnerIndustryController {

    private final IMerchantIndustryService merchantIndustryService;

    public InnerIndustryController(IMerchantIndustryService merchantIndustryService) {
        this.merchantIndustryService = merchantIndustryService;
    }

    @GetMapping("/info")
    public ResultJson<MerchantIndustryInfoVo> info(@RequestParam long merchantNo) {
        return ResultJson.ok(merchantIndustryService.industryInfo(merchantNo));
    }

    @GetMapping("/merchant-ability")
    public ResultJson<List<IndustryAttrEntity>> ability(@RequestParam long merchantNo) {
        return ResultJson.ok(merchantIndustryService.merchantChargeAbility(merchantNo));
    }
}
